<?php

namespace app\index\controller;

use app\index\model\BidModel;
use app\index\model\DaysModel;
use app\index\model\DealcomModel;
use app\index\model\EmailModel;
use app\index\model\EnginBaoModel;
use app\index\model\EnginJianModel;
use app\index\model\EnginModel;
use app\index\model\EnginShiModel;
use app\index\model\EnginYueModel;
use app\index\model\FlowBillModel;
use app\index\model\FlowClassModel;
use app\index\model\FlowCourseModel;
use app\index\model\FlowPromerModel;
use app\index\model\FlowSetModel;
use app\index\model\FlowTaskModel;
use app\index\model\FlowTaskShenModel;
use app\index\model\HuiModel;
use app\index\model\MeetModel;
use app\index\model\NewsModel;
use app\index\model\NoticeModel;
use app\index\model\TaskModel;
use app\index\model\TodoModel;
use app\index\model\UserModel;
use app\index\model\WenFaModel;
use app\index\model\WenFenModel;
use app\index\service\FlowService;
use app\index\service\OptService;
use app\index\service\XingService;
use think\Db;
use think\Exception;
use think\Request;

class Welcome extends Common
{

    public function get_topinfo(){
        $data['engin_zong'] = EnginModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        $data['engin_zai'] = EnginModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0,'state'=>3])->count();

        $data['bao_zong'] = EnginBaoModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        $data['bao_shen'] = EnginBaoModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0,'status'=>0])->count();

        $data['shi_zong'] = EnginShiModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        $data['shi_shen'] = EnginShiModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0,'status'=>0])->count();

        $data['jian_zong'] = EnginJianModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        $data['jian_shen'] = EnginJianModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0,'status'=>0])->count();

        $data['yue_zong'] = EnginYueModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        $data['yue_shen'] = EnginYueModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0,'status'=>0])->count();

        $data['dealcom_zong'] = DealcomModel::where(['comid'=>$this->userinfo['comid'],'deleted_user'=>0])->count();
        return outputJson(2000,lang('code_2000'),$data);
    }





}